package com.community.controller;

import com.community.entity.Order;
import com.community.service.OrderService;
import com.community.util.Result;
import com.community.util.Search;
import com.feng.fengDUtil.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/expertOrder")
public class ExpertOrderAction {
    @Autowired
    private OrderService orderService;

    @RequestMapping(value = "/list")
    public Result list(Page page, Search search) {
        orderService.query(page,search);
        return Result.success(page);
    }

    @RequestMapping(value = "/dealOrder")
    public Result dealOrder(@RequestBody Order order) {
        orderService.dealOrder(order);
        return Result.success();
    }

}
